package com.project.junM.service.impl;

import com.project.junM.entity.TCheckitem;
import com.project.junM.entity.TMember;
import com.project.junM.mapper.TCheckitemMapper;
import com.project.junM.service.CheckitemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.util.List;

@Service
public class CheckitemServiceImpl implements CheckitemService {

    @Autowired
    private TCheckitemMapper tCheckitemMapper;

    @Override
    public List<TCheckitem> queryCheckItemAll(HttpSession session) {
        TMember user = (TMember)session.getAttribute("user");
        System.out.println(tCheckitemMapper.queryCheckItemAll(user.getId()));
        System.out.println(user.getId());
        return tCheckitemMapper.queryCheckItemAll(user.getId());
    }
}
